package com.bw.lib_fan

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter

class ViewPagerAdapter(fragmentActivity:FragmentActivity):FragmentStateAdapter(fragmentActivity) {

    private val fragments= listOf(
        FirstFragment(),
        SecondFragment(),
        ThirdFragment()
    )


    override fun getItemCount(): Int =fragments.size

    override fun createFragment(position: Int): Fragment=fragments[position]

}